﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AdvPictureAction.ascx.cs"
    Inherits="controls_admin_AdvPositionAction" %>
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5>
            Cập nhật quảng cáo</h5>
        <div class="search">
            <div class="input">
            </div>
            <div class="button">
                <asp:Button ID="btnAdv" runat="server" Text="Danh sách quảng cáo" UseSubmitBehavior="false"
                    OnClick="btnAdv_Click" />
            </div>
        </div>
    </div>
    <!-- end box / title -->
    <div id="divMessage" runat="server">
    </div>
    <div class="form">
        <div class="fields" style="left: 300px;">
            <div class="field  field-first">
                <div class="label">
                    <label for="input-small">
                        Tên Quảng cáo:
                    </label>
                </div>
                <div class="input">
                    <div style="margin-right: 10px; float: left">
                        <asp:TextBox ID="txtTitle" runat="server" CssClass="required" Width="250px" MaxLength="500" />
                    </div>
                    <div class="note" id="NOTE_TITLE" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Chọn đường dẫn:
                    </label>
                </div>
                <div class="input">
                    <div style="margin-right: 10px; float: left">
                        <asp:FileUpload ID="fulAdv" runat="server" />
                        <br />
                        <img src="" id="imgAdv" runat="server" height="90" />
                    </div>
                    <div class="note" id="NOTE_URL" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Link to:
                    </label>
                </div>
                <div class="input">
                    <div style="margin-right: 10px; float: left">
                        <asp:TextBox ID="txtUrl" runat="server" CssClass="required url" Width="250px" />
                    </div>
                    <div class="note" id="NOTE_LINK" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Module:
                    </label>
                </div>
                <div class="input">
                    <div style="margin-right: 10px; float: left">
                        <asp:DropDownList ID="ddlModule" runat="server">
                        </asp:DropDownList>
                    </div>
                    <div class="note" id="NOTE_MODULE" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="date">
                        Ngày hết hạn(dd/mm/yyyy):</label>
                </div>
                <div class="input">
                    <asp:Calendar runat="server" ID="cldEndDate" Width="300px" Height="200px" />
                    <div class="note" id="NOTE_ENDDATE" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Hiển thị trang chủ:
                    </label>
                </div>
                <div class="input">
                    <div style="margin-right: 10px; float: left">
                        <asp:CheckBox ID="chbDisplay" runat="server" Checked="true" />
                    </div>
                    <div class="note" id="NOTE_DISPLAY" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Thứ tự hiển thị:</label>
                </div>
                <div class="input">
                    <div style="margin-right: 10px; float: left">
                        <asp:TextBox ID="txtSortDisplay" runat="server" CssClass="medium required" Width="385"
                            Text="1" />
                    </div>
                    <div class="note" id="NOTE_SORT" runat="server" />
                </div>
            </div>
            <div class="buttons">
                <asp:Button ID="btnSubmit" runat="server" Text="Đồng ý" OnClick="btnSubmit_Click" />
            </div>
        </div>
    </div>
    <div style="text-align: center; margin: 10px">
        <%if (Session["url"] != null)
          {
              if (Request.UrlReferrer != null)
              {
                  if (!Request.UrlReferrer.ToString().Equals(Request.Url.ToString()))
                  {
                      Session["url"] = Request.UrlReferrer.ToString();                      
                  
        %>
        <a onclick="history.go(-1);" title="Trang trước">
            <%
}
                      else
                      {
            %>
            <a href='<%=Session["url"].ToString() %>' title="Trang trước">
                <%   
}
                  }
                  else
                  {                      
                %>
                <a onclick="history.go(-1);" title="Trang trước">
                    <%}
              }
          else
          {
              if (Request.UrlReferrer != null)
                  Session.Add("url", Request.UrlReferrer.ToString());
              else
                  Session.Add("url", Request.Url.ToString());
                    %>
                    <a href="default.aspx" title="Trang trước">
                        <%} %>
                        <img src="../resources/images/icons/16x16/arrow-return.png" alt="Trang trước" /></a>
                    &nbsp;&nbsp; <a href="default.aspx" title="Trang chủ">
                        <img src="../resources/images/icons/16x16/home.png" alt="Trang chủ" /></a>
    </div>
</div>
